<?php

/**
 * Interface class. Used for interface translation and text handling.
 *
 */
class transInt {
	
	/**
	 * Interface tekst vertalen
	 *
	 * @param string $target Tekst die je vertaald wil krijgen
	 * @return string Return van de vertaalde string
	 *
	 */
	function t($target,$taal=1) {
		$db = new DB();
		$db->connectDb();
		
		$sql = 'select * from strings where identifier="'. $target .'" and taal_id='. $taal;
		
		if(!$res = mysql_query($sql)) {
			throw new Exception("SQL Error(" .mysql_errno(). ") in " . __CLASS__ . ": " . mysql_error());
		}
		
		$row = mysql_fetch_array($res);
		return $row['value'];
		
		$db->closeDb();
	}		
}

?>